package com.ccc.dingtalk.constant;

/**
 * 位置结果枚举类
 *
 * @author superC
 * @version 1.0.0
 * @date 2023-08-08
 */

public enum LocationResultEnum {

    /**
     *位置结果：
     *
     * Normal：范围内
     * Outside：范围外
     * NotSigned：未打卡
     */

    NORMAL("Normal", "范围内"),

    OUTSIDE("Outside", "范围外"),

    NOTSIGNED("NotSigned", "未打卡")

    ;

    /**
     * 英文标识
     */
    private final String mark;

    /**
     * 中文显示
     */
    private final String label;

    LocationResultEnum(String mark, String label) {
        this.mark = mark;
        this.label = label;
    }

    public String getMark() {
        return mark;
    }

    public String getLabel() {
        return label;
    }

    public static String getLabel(String mark) {
        for (LocationResultEnum item : LocationResultEnum.values()) {
            if (item.getMark().equals(mark)) {
                return item.getLabel();
            }
        }
        return LocationResultEnum.NORMAL.getLabel();
    }
}
